{
 "cells": [
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "1. 上涨\n",
    "\n",
    "2. 下跌\n",
    "\n",
    "3. 震荡\n",
    "\n",
    "震荡上涨\n",
    "震荡下跌\n",
    "\n",
    "根据传入的数据、时间段，判断这个时间段是什么趋势；\n",
    "而非自己拆分这段时间的趋势；\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import sys\n",
    "import numpy as np\n",
    "\n",
    "sys.path.append('..')\n",
    "from common import candle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>times</th>\n",
       "      <th>highp</th>\n",
       "      <th>openp</th>\n",
       "      <th>lowp</th>\n",
       "      <th>nowv</th>\n",
       "      <th>preclose</th>\n",
       "      <th>curvol</th>\n",
       "      <th>curvalue</th>\n",
       "      <th>dkWarnType</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>2021-11-04</td>\n",
       "      <td>100.38</td>\n",
       "      <td>91.40</td>\n",
       "      <td>90.30</td>\n",
       "      <td>95.32</td>\n",
       "      <td>91.25</td>\n",
       "      <td>90153615.0</td>\n",
       "      <td>8.611881e+09</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>2021-10-29</td>\n",
       "      <td>91.30</td>\n",
       "      <td>81.00</td>\n",
       "      <td>76.51</td>\n",
       "      <td>91.25</td>\n",
       "      <td>79.46</td>\n",
       "      <td>119107584.0</td>\n",
       "      <td>9.742871e+09</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>2021-10-22</td>\n",
       "      <td>85.02</td>\n",
       "      <td>71.41</td>\n",
       "      <td>71.41</td>\n",
       "      <td>79.46</td>\n",
       "      <td>71.37</td>\n",
       "      <td>84213248.0</td>\n",
       "      <td>6.640456e+09</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2021-10-15</td>\n",
       "      <td>72.99</td>\n",
       "      <td>59.00</td>\n",
       "      <td>55.88</td>\n",
       "      <td>71.37</td>\n",
       "      <td>59.36</td>\n",
       "      <td>87696384.0</td>\n",
       "      <td>5.682101e+09</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>2021-10-08</td>\n",
       "      <td>67.40</td>\n",
       "      <td>67.00</td>\n",
       "      <td>59.36</td>\n",
       "      <td>59.36</td>\n",
       "      <td>65.95</td>\n",
       "      <td>19460096.0</td>\n",
       "      <td>1.185766e+09</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "        times   highp  openp   lowp   nowv  preclose       curvol  \\\n",
       "0  2021-11-04  100.38  91.40  90.30  95.32     91.25   90153615.0   \n",
       "1  2021-10-29   91.30  81.00  76.51  91.25     79.46  119107584.0   \n",
       "2  2021-10-22   85.02  71.41  71.41  79.46     71.37   84213248.0   \n",
       "3  2021-10-15   72.99  59.00  55.88  71.37     59.36   87696384.0   \n",
       "4  2021-10-08   67.40  67.00  59.36  59.36     65.95   19460096.0   \n",
       "\n",
       "       curvalue  dkWarnType  \n",
       "0  8.611881e+09           0  \n",
       "1  9.742871e+09           0  \n",
       "2  6.640456e+09           0  \n",
       "3  5.682101e+09           0  \n",
       "4  1.185766e+09           0  "
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "path = 'F:\\HQData\\market_A\\\\'\n",
    "weekpath = 'F:\\HQData\\week_A\\\\'\n",
    "file_index = weekpath + \"index_SZZS.csv\"\n",
    "file_jake = weekpath +\"002459.csv\"\n",
    "\n",
    "#df = pd.read_csv(file_index)\n",
    "df=pd.read_csv(file_jake)\n",
    "df.head()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>High</th>\n",
       "      <th>Open</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>preclose</th>\n",
       "      <th>Volume</th>\n",
       "      <th>curvalue</th>\n",
       "      <th>dkWarnType</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>times</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2015-01-09</th>\n",
       "      <td>12.96</td>\n",
       "      <td>12.80</td>\n",
       "      <td>12.28</td>\n",
       "      <td>12.71</td>\n",
       "      <td>12.62</td>\n",
       "      <td>5619200.0</td>\n",
       "      <td>71019418.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-01-16</th>\n",
       "      <td>12.71</td>\n",
       "      <td>12.61</td>\n",
       "      <td>12.20</td>\n",
       "      <td>12.36</td>\n",
       "      <td>12.71</td>\n",
       "      <td>5012224.0</td>\n",
       "      <td>61916992.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-01-23</th>\n",
       "      <td>13.63</td>\n",
       "      <td>12.21</td>\n",
       "      <td>12.01</td>\n",
       "      <td>13.63</td>\n",
       "      <td>12.36</td>\n",
       "      <td>9127424.0</td>\n",
       "      <td>118523281.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-01-30</th>\n",
       "      <td>14.02</td>\n",
       "      <td>13.74</td>\n",
       "      <td>13.47</td>\n",
       "      <td>13.85</td>\n",
       "      <td>13.63</td>\n",
       "      <td>10563328.0</td>\n",
       "      <td>145862024.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015-02-06</th>\n",
       "      <td>14.32</td>\n",
       "      <td>13.79</td>\n",
       "      <td>13.68</td>\n",
       "      <td>13.95</td>\n",
       "      <td>13.85</td>\n",
       "      <td>8248064.0</td>\n",
       "      <td>116174426.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             High   Open    Low  Close  preclose      Volume     curvalue  \\\n",
       "times                                                                       \n",
       "2015-01-09  12.96  12.80  12.28  12.71     12.62   5619200.0   71019418.0   \n",
       "2015-01-16  12.71  12.61  12.20  12.36     12.71   5012224.0   61916992.0   \n",
       "2015-01-23  13.63  12.21  12.01  13.63     12.36   9127424.0  118523281.0   \n",
       "2015-01-30  14.02  13.74  13.47  13.85     13.63  10563328.0  145862024.0   \n",
       "2015-02-06  14.32  13.79  13.68  13.95     13.85   8248064.0  116174426.0   \n",
       "\n",
       "            dkWarnType  \n",
       "times                   \n",
       "2015-01-09           0  \n",
       "2015-01-16           0  \n",
       "2015-01-23           0  \n",
       "2015-01-30           0  \n",
       "2015-02-06           0  "
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1 = df[df.times>'2015']\n",
    "df1 = df1.sort_values('times')\n",
    "df1.set_index('times', inplace=True)\n",
    "df1.rename( columns={'times':'Date','openp':'Open', 'highp':'High','lowp':'Low',\"nowv\":'Close','curvol':\"Volume\"}, inplace=True)\n",
    "\n",
    "df1.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# trend_break(df1)\n",
    "def trend_up(df):\n",
    "    count = 0\n",
    "    for i in range(1, len(df)):\n",
    "        if df.High[i] >= df.High[i - 1]:\n",
    "            count = count + 1\n",
    "        else:\n",
    "            count = 0\n",
    "        if count > 10:\n",
    "            return True\n",
    "        \n",
    "    return False    \n",
    "\n",
    "trend_up(df1)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "end\n"
     ]
    }
   ],
   "source": [
    "# items = zip(range(len(df1)), df1.iterrows())\n",
    "#df1.rename( columns={'times':'Date','openp':'Open', 'highp':'High','lowp':'Low',\"nowv\":'Close','curvol':\"Volume\"}, inplace=True)\n",
    "# trend_up(df1)\n",
    "#trend_down(df1)\n",
    "\n",
    "trend_split(df1)\n",
    "#df1.head()"
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "trend_up=[]\n",
    "trend_down=[]\n",
    "trend_updown=[]\n",
    "\n",
    "for idx, (date,row) in items:\n",
    "    print(idx)\n",
    "    print(date)\n",
    "    print(row)\n",
    "    break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x1e0652cc280>"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO2dd5gjV5W336vcOffkmZ48Hs+MPfY42zjjxAdmiSaZaNKy64UlpwUM6yXDLgt4sbFhjVkDNtEEM87ZM/bknHPnqBzu90dVSdXdUre6W+qW1Od9nnlGKpWk01dVvzp17rnnKK01giAIwvTBMdUGCIIgCJOLCL8gCMI0Q4RfEARhmiHCLwiCMM0Q4RcEQZhmuCbzyxobG3VLS8tkfqUgCELRs3Hjxg6tdVOuPm9Shb+lpYUNGzZM5lcKgiAUPUqpw7n8PAn1CIIgTDNE+AVBEKYZIvyCIAjTDBF+QRCEaYYIvyAIwjRDhF8QBGGaIcIvCIIwzRDhFwShJNFa88BLx/CHY1NtSsEhwi8IQkmy+VgvH71/M5//7bapNqXgEOEXBKEkCUfjABzpCkyxJYWHCL8gCCWJ06EAiMQTU2xJ4SHCLwhCSRKOGYIfiYnwD0WEXxCEkiQYMUI94/H4f/nCET78i5cImeGiUkOEXxCEkiRoivZYPf7tJ3r51ANb+dOWkxxo9+fDtClHhF8QhJLEEv7oGD3+kz2h5OO+UDSnNhUKIvyCIJQkoXF6/D3BlNj3Baep8Cul5imlHlVK7VRKbVdK/fOQ1/9VKaWVUo35M1MQBGFsWDH+aFyP6X09gUjycX+oNBd/ZdOBKwZ8T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uGXkg2CIAjTDFm5KwiCMM0Q4RcEQZhmiPALgiBMM0T4BUEQphki/IIgCNMMEX6h5FBK1SqlPmQ+nq2U+vVU2yQIhYSkcwolh1l75Y9a61VTbIogFCSuqTZAEPLA7RhF1jZhLMQ5TWu9Sin1TowCZU6M0rrfwih98HaMxUXXa627zPo8P8AolRAA3qe13qWUegPwRYyFX71a61dM8t8lCDlBQj1CKfIpjLpLZzK8YuEq4C3AuRiNMQJaa6vq5TvMfe4APqK1Phv4V+C/ze1fAK7RWp+BUddFEIoS8fiF6caj2iiw16+U6sUotQBGWYQ1ZrXGC4Ff2Spue83/nwbuVkrdj7GEXxCKEhF+Ybphr6GesD1PYJwPDqDHvFsYhNb6A0qp8zA6eG1SSp2pte7Mt8GCkGsk1COUIv0YvRXGjDbq3R804/kogzPMx4u11s9rrb+A0f0or81MBCFfiMcvlBxa606l1NNKqW0Y1TPHyluBHyqlPodRfvuXGOWDv6GUWopR0ne9uU0Qig5J5xQEQZhmSKhHEARhmiHCLwiCMM0Q4RcEQZhmiPALgiBMM0T4BUEQphki/IIgCNMMEX5BEIRpxv8HkzP/adGmDt8AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "df1.Close.plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>High</th>\n",
       "      <th>Open</th>\n",
       "      <th>Low</th>\n",
       "      <th>Close</th>\n",
       "      <th>preclose</th>\n",
       "      <th>Volume</th>\n",
       "      <th>curvalue</th>\n",
       "      <th>signType</th>\n",
       "      <th>dkWarnType</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>times</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2021-10-15</th>\n",
       "      <td>3578.77</td>\n",
       "      <td>3551.99</td>\n",
       "      <td>3542.69</td>\n",
       "      <td>3572.37</td>\n",
       "      <td>3558.28</td>\n",
       "      <td>3.202930e+10</td>\n",
       "      <td>4.259247e+11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-18</th>\n",
       "      <td>3571.05</td>\n",
       "      <td>3571.05</td>\n",
       "      <td>3539.48</td>\n",
       "      <td>3568.14</td>\n",
       "      <td>3572.37</td>\n",
       "      <td>3.409506e+10</td>\n",
       "      <td>4.557879e+11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-19</th>\n",
       "      <td>3596.79</td>\n",
       "      <td>3562.30</td>\n",
       "      <td>3560.62</td>\n",
       "      <td>3593.15</td>\n",
       "      <td>3568.14</td>\n",
       "      <td>3.341977e+10</td>\n",
       "      <td>4.401815e+11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-20</th>\n",
       "      <td>3596.05</td>\n",
       "      <td>3583.24</td>\n",
       "      <td>3574.30</td>\n",
       "      <td>3587.00</td>\n",
       "      <td>3593.15</td>\n",
       "      <td>3.442450e+10</td>\n",
       "      <td>4.504830e+11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2021-10-21</th>\n",
       "      <td>3610.96</td>\n",
       "      <td>3590.05</td>\n",
       "      <td>3576.35</td>\n",
       "      <td>3594.78</td>\n",
       "      <td>3587.00</td>\n",
       "      <td>3.523109e+10</td>\n",
       "      <td>4.535717e+11</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "               High     Open      Low    Close  preclose        Volume  \\\n",
       "times                                                                    \n",
       "2021-10-15  3578.77  3551.99  3542.69  3572.37   3558.28  3.202930e+10   \n",
       "2021-10-18  3571.05  3571.05  3539.48  3568.14   3572.37  3.409506e+10   \n",
       "2021-10-19  3596.79  3562.30  3560.62  3593.15   3568.14  3.341977e+10   \n",
       "2021-10-20  3596.05  3583.24  3574.30  3587.00   3593.15  3.442450e+10   \n",
       "2021-10-21  3610.96  3590.05  3576.35  3594.78   3587.00  3.523109e+10   \n",
       "\n",
       "                curvalue  signType  dkWarnType  \n",
       "times                                           \n",
       "2021-10-15  4.259247e+11         0           0  \n",
       "2021-10-18  4.557879e+11         0           0  \n",
       "2021-10-19  4.401815e+11         0           0  \n",
       "2021-10-20  4.504830e+11         0           0  \n",
       "2021-10-21  4.535717e+11         0           0  "
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df1.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'df' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-3-ae948e3dbdac>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;31m# candle.candlePlot(df)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 2\u001b[1;33m \u001b[0mdf\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrename\u001b[0m\u001b[1;33m(\u001b[0m \u001b[0mcolumns\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;33m{\u001b[0m\u001b[1;34m'times'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m'Date'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'openp'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m'Open'\u001b[0m\u001b[1;33m,\u001b[0m \u001b[1;34m'highp'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m'High'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'lowp'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m'Low'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m\"nowv\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m'Close'\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;34m'curvol'\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;34m\"Volume\"\u001b[0m\u001b[1;33m}\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0minplace\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;32mTrue\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m      3\u001b[0m \u001b[0mcandle\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcandlePlot\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mdf\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
      "\u001b[1;31mNameError\u001b[0m: name 'df' is not defined"
     ]
    }
   ],
   "source": [
    "# candle.candlePlot(df)\n",
    "\n",
    "candle.candlePlot(df)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already up-to-date: mplfinance in c:\\programdata\\anaconda3\\lib\\site-packages (0.12.7a17)\n",
      "Requirement already satisfied, skipping upgrade: pandas in c:\\programdata\\anaconda3\\lib\\site-packages (from mplfinance) (1.0.5)\n",
      "Requirement already satisfied, skipping upgrade: matplotlib in c:\\programdata\\anaconda3\\lib\\site-packages (from mplfinance) (3.2.2)\n",
      "Requirement already satisfied, skipping upgrade: python-dateutil>=2.6.1 in c:\\users\\ldq\\appdata\\roaming\\python\\python38\\site-packages (from pandas->mplfinance) (2.8.0)\n",
      "Requirement already satisfied, skipping upgrade: numpy>=1.13.3 in c:\\programdata\\anaconda3\\lib\\site-packages (from pandas->mplfinance) (1.20.3)\n",
      "Requirement already satisfied, skipping upgrade: pytz>=2017.2 in c:\\programdata\\anaconda3\\lib\\site-packages (from pandas->mplfinance) (2020.1)\n",
      "Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib->mplfinance) (2.4.7)\n",
      "Requirement already satisfied, skipping upgrade: cycler>=0.10 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib->mplfinance) (0.10.0)\n",
      "Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in c:\\programdata\\anaconda3\\lib\\site-packages (from matplotlib->mplfinance) (1.2.0)\n",
      "Requirement already satisfied, skipping upgrade: six>=1.5 in c:\\programdata\\anaconda3\\lib\\site-packages (from python-dateutil>=2.6.1->pandas->mplfinance) (1.15.0)\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "# 1.0 连续10日以上才是趋势； 否则视为震荡\n",
    "def trend_up(df):\n",
    "    count = 0\n",
    "    for i in range(1, len(df)):\n",
    "        if df.High[i] >= df.High[i - 1]:\n",
    "            count = count + 1\n",
    "        else:\n",
    "            count = 0\n",
    "        if count > 10:\n",
    "            return True\n",
    "        \n",
    "    return False    \n",
    "\n",
    "def trend_down(df):\n",
    "    count = 0\n",
    "    for i in range(1, len(df)):\n",
    "        if df.High[i] >= df.High[i - 1]:\n",
    "            count = count + 1\n",
    "        else:\n",
    "            count = 0\n",
    "            \n",
    "        if count > 10:\n",
    "            print('yes')\n",
    "            return True\n",
    "        \n",
    "    return False\n",
    "\n",
    "def trend_updown(df): \n",
    "    count = 0\n",
    "    for i in range(1, len(df)):\n",
    "        if df.High[i] >= df.High[i - 1]:\n",
    "            pass\n",
    "        else:\n",
    "            print(df.index[i])\n",
    "        \n",
    "def trend_split(df): \n",
    "    trendtype = 0\n",
    "    \n",
    "    for i in range(1, len(df)):\n",
    "        indexDate = df.index[i]\n",
    "        # 上涨\n",
    "        if df.High[i] >= df.High[i - 1]:\n",
    "            if trendtype != 1: # 第一次满足上涨趋势\n",
    "                trendtype = 1\n",
    "                upcount = 0\n",
    "                trend_up_start = indexDate\n",
    "                \n",
    "            upcount=upcount+1            \n",
    "        else:\n",
    "            if trendtype ==1: # 上涨结束\n",
    "                #记录结果\n",
    "                if upcount > 2:\n",
    "                    print('上涨趋势从【%s】开始， 到【%s】结束; 持续【%d】天；'%(trend_up_start, indexDate, upcount))\n",
    "                # 清空数据\n",
    "                trendtype =  0\n",
    "                upcount = 0\n",
    "                break\n",
    "                \n",
    "            upcount=0\n",
    "            trendtype = 0\n",
    "            \n",
    "        # 下跌\n",
    "        if df.Low[i] <= df.Low[i - 1]:\n",
    "            if trendtype != 2: # 第一次满足下跌趋势\n",
    "                trendtype = 2\n",
    "                downcount = 0\n",
    "                trend_down_start = indexDate\n",
    "                \n",
    "            downcount=downcount+1            \n",
    "        else:\n",
    "            if trendtype == 2: # 下跌结束\n",
    "                #记录结果\n",
    "                if downcount > 2:\n",
    "                    print('下跌趋势从【%s】开始， 到【%s】结束; 持续【%d】天；'%(trend_up_start, indexDate, upcount))\n",
    "                # 清空数据\n",
    "                trendtype =  0\n",
    "                upcount = 0\n",
    "                break\n",
    "                \n",
    "            downcount=0\n",
    "            trendtype = 0\n",
    "        \n",
    "    print('end')\n",
    "    \n",
    "    \n",
    "\n",
    "def trend_break(df): \n",
    "    # maxHigh = np.iinfo(np.float32).min\n",
    "    # minLow = np.iinfo(np.float32).max\n",
    "    maxHigh = df.High[0] \n",
    "    minLow = df.Low[0]\n",
    "    listup=list()\n",
    "    listdown=list()\n",
    "    for i in range(0, len(df)):\n",
    "        if df.High[i] > maxHigh:\n",
    "            listup.append('在【{%s}】向上突破[%f]'%(df.index[i], maxHigh))\n",
    "            maxHigh = df.High[i]\n",
    "        \n",
    "        if df.Low[i] > minLow:\n",
    "            listdown.append('在【{%s}】向下突破[%f]'%(df.index[i], minLow))\n",
    "            minLow =   df.Low[i]  \n",
    "    print(listup)\n",
    "    print(listdown)\n",
    "    print('end')    "
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
